/*     */ package com.hp.bon.sgw.service;
/*     */ 
/*     */ import com.hp.bon.sgw.bean.NENodeCallTrendBean;
/*     */ import com.hp.bon.sgw.bean.TrendVar;
/*     */ import com.hp.bon.sgw.ctrl.VarFether;
/*     */ 
/*     */ class FluxCtrlVar extends VarFether
/*     */ {
/*     */   private final NENodeCallTrendBean treanBean;
/*     */ 
/*     */   public FluxCtrlVar(NENodeCallTrendBean treanBean)
/*     */   {
/* 373 */     this.treanBean = treanBean;
/*     */   }
/*     */ 
/*     */   public Object getVarValue(String varName) {
/* 377 */     TrendVar trendvar = null;
/* 378 */     if (varName.startsWith("callCounts."))
/* 379 */       trendvar = this.treanBean.callCountsTrend;
/* 380 */     else if (varName.startsWith("callFlux."))
/* 381 */       trendvar = this.treanBean.callFluxTrend;
/* 382 */     else if (varName.startsWith("callRTT."))
/* 383 */       trendvar = this.treanBean.callRTTTrend;
/*     */     else {
/* 385 */       throw new IllegalArgumentException("not recoginized var " + varName);
/*     */     }
/* 387 */     if (varName.endsWith(".curValue"))
/* 388 */       return Double.valueOf(trendvar.curValue);
/* 389 */     if (varName.endsWith(".prevDelta"))
/* 390 */       return Double.valueOf(trendvar.prevDelta);
/* 391 */     if (varName.endsWith(".curDelta"))
/* 392 */       return Double.valueOf(trendvar.curDelta);
/* 393 */     if (varName.endsWith(".curDelta"))
/* 394 */       return Double.valueOf(trendvar.curDelta);
/* 395 */     if (varName.endsWith(".growSpeed")) {
/* 396 */       return Double.valueOf(trendvar.growSpeed);
/*     */     }
/* 398 */     throw new IllegalArgumentException("not recoginized var " + varName);
/*     */   }
/*     */ }

/* Location:           C:\Users\think\Desktop\sgw_2.1.jar
 * Qualified Name:     com.hp.bon.sgw.service.FluxCtrlVar
 * JD-Core Version:    0.6.1
 */